package profiler.parameters.monitors;

import org.hyperic.sigar.Cpu;
import org.hyperic.sigar.Sigar;
import org.hyperic.sigar.SigarException;

public class CpuParameter extends GenericParameter{
	
	private static Cpu cpuValue;
	private static Sigar sigarValue = new Sigar();
	private static String id;
	
	private static final double BYTE = 1.0;
	private static final double GIGA = 1073741824.0;

	public CpuParameter () throws SigarException{
		super(id, sigarValue); 
		cpuValue = sigarValue.getCpu();
	}
	
	public String generateReport(){
		String report = "Total Cpu: " + CpuParameter.cpuValue.getTotal()/GIGA + " Ghz" + "\n" + 
				"Total Idle: "+ CpuParameter.cpuValue.getIdle()/GIGA + " Ghz" + "\n";
		return report;
	}
	
}
